<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            perspective: 500px;
        }
        div{
            width: 300px;
            height: 300px;
            background-color: pink;
            margin: 100px auto;
        }
        div:hover{
            /* transform: translateZ(-300px); */
            transform: translate3d(100px, 100px, 100px);
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>